home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10430 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: CONVERTING INTEGER TO ASCII??????
  5. Date: Sun, 17 Mar 96 19:17:29 GMT
  6. Organization: none
  7. Distribution: world
  8. Message-ID: <827090249snz@genesis.demon.co.uk>
  9. References: <4i17r9$2kn@maltese.eag.unisysgsg.com> <4i1cvg$1cg@solutions.solon.com> <4ic5kp$d0g@athos.cc.bellcore.com> <16MAR199609550235@erich.triumf.ca>
  10. Reply-To: fred@genesis.demon.co.uk
  11. X-NNTP-Posting-Host: genesis.demon.co.uk
  12. X-Newsreader: Demon Internet Simple News v1.27
  13. X-Mail2News-Path: genesis.demon.co.uk
  14.  
  15. In article <16MAR199609550235@erich.triumf.ca>
  16.            bennett@erich.triumf.ca "P.Bennett" writes:
  17.  
  18. >In article <4ic5kp$d0g@athos.cc.bellcore.com>, "Sandeep V. Tamhankar"
  19. > <stamhank@notes.cc.bellcore.com> writes...
  20. >
  21. >>Another way to convert integer to ASCII is to add char '0' to your 
  22. >>integer.  Like so:
  23. >> 
  24. >>             int asc;
  25. >>             asc= known_int + '0';
  26. >> 
  27. >>This way, you don't have to load any function and there is no overhead.
  28. >
  29. >But this only works for 10 of the (at least) 65,536 possible integer values.
  30.  
  31. Well, at least 65535.
  32.  
  33. -- 
  34. -----------------------------------------
  35. Lawrence Kirby | fred@genesis.demon.co.uk
  36. Wilts, England | 70734.126@compuserve.com
  37. -----------------------------------------
  38.